package com.zxy.controller;

import com.beimao.service.IAnswerService;
import com.beimao.service.IGameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RefreshScope
public class GameController implements IGameService{

    @Autowired
    private IAnswerService iAnswerService;

    @Override
    public String play(Integer number){
        iAnswerService.answer(number);
        return "我收到你的随机数"+number;
    }
}
